﻿@inject CommonSettings commonSettings
@inject SeoSettings seoSettings
@inject StoreInformationSettings storeInformationSettings
@{
    var displayMiniProfiler = storeInformationSettings.DisplayMiniProfilerInPublicStore;
    //X-UA-Compatible tag
    if (commonSettings.RenderXuaCompatible)
    {
        Html.AppendHeadCustomParts(string.Format("<meta http-equiv=\"X-UA-Compatible\" content=\"{0}\">", commonSettings.XuaCompatibleValue));
    }
    //custom tag(s);
    if (!string.IsNullOrEmpty(seoSettings.CustomHeadTags))
    {
        Html.AppendHeadCustomParts(seoSettings.CustomHeadTags);
    }
}
<!DOCTYPE html>
<html lang="@(this.WorkingLanguage())" @(this.ShouldUseRtlTheme() ? Html.Raw("dir=\"rtl\"") : null)>
<head>
    <title>@Html.GrandTitle(true)</title>
    <meta charset="utf-8">
    <meta name="description" content="@(Html.GrandMetaDescription())">
    <meta name="keywords" content="@(Html.GrandMetaKeywords())">
    <meta name="generator" content="grandnode">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
    @*<link rel="manifest" href="/manifest.webmanifest" />*@
    @Html.GrandHeadCustom()
    @*This is used so that themes can inject content into the header*@
    <partial name="Head" />
    @await Component.InvokeAsync("Widget", new { widgetZone = "head_html_tag" })
    @Html.GrandCssFiles(this.Url, ResourceLocation.Head)
    @Html.GrandScripts(this.Url, ResourceLocation.Head)
    @Html.GrandCanonicalUrls()
    @await Component.InvokeAsync("NewsRssHeaderLink")
    @await Component.InvokeAsync("BlogRssHeaderLink")
    @*Favicon - upload favicon.ico file to the root directory*@
    @await Component.InvokeAsync("Favicon")
    @if (displayMiniProfiler)
    {
        <mini-profiler />
    }
</head>
<body>
    <resources asp-type="ScriptHeader" />
    @RenderBody()
    @Html.GrandCssFiles(this.Url, ResourceLocation.Footer)
    @Html.GrandScripts(this.Url, ResourceLocation.Footer)
    <resources asp-type="ScriptFooter" />
</body>
</html>
